<!DOCTYPE html>
 
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>切换</title>
<script type="text/javascript" src="tool.js"></script>
<script type="text/javascript" src="base.js"></script>
<link rel="stylesheet" type="text/css" href="demo.css" />
</head>
<body>


<div id="box">box</div>

<div id="pox">pox</div>

<input type="button" id="button" value="按钮" />

<input type="button" id="button2" value="按钮2" />


</body>
<script>
	
$(function () {
	
	$('#button').toggle(function () {
		$('#box').css('background', 'blue');
	}, function () {
		$('#box').css('background', 'green');
	}, function () {
		$('#box').css('background', 'orange');
	}, function () {
		$('#box').css('background', 'red');
	});
	
	$('#button2').toggle(function () {
		$('#pox').css('background', 'blue');
	}, function () {
		$('#pox').css('background', 'green');
	}, function () {
		$('#pox').css('background', 'orange');
	}, function () {
		$('#pox').css('background', 'red');
	});	
	
	
});


</script>
</html>
